{% extends 'bbs/base.html' %}
{% load staticfiles %}
{% block title %}首页--Klein{% endblock %}
<style>
    .board-logo {
        width: 50px;
        height: 50px;
    }

</style>

{% block body %}
    <div class="container">

        {% for board in board %}
            {#        {{ board.board_title }}#}
{#            <div class="media col-md-10 col-md-offset-1">#}
{#                <div class="media-left media-middle">#}
{##}
{#                    <img class="media-object" src="{% static 'img/bbs/442.gif' %}">#}
{#                    <img src="{% static 'img/bbs/male.jpg' %}" class="img-responsive">#}
{##}
{#                </div>#}
{#                <div class="media-body">#}
{#                    <h4 class="media-heading">#}
{#                        <a href="{% url 'topic_list' board.id %}">{{ board.board_title }}</a>#}
{#                    </h4>#}
{##}
{#                    <div class="row">#}
{#                        <div class="col-md-10 col-md-offset-1">#}
{#                            {{ board.board_desc_short }}#}
{#                        </div>#}
{#                    </div>#}
{#                    <div class="row">#}
{#                        <div class="col-md-10 col-md-offset-1">#}
{#                            版面主题数：{{ board.board_total_topic }}#}
{#                        </div>#}
{#                    </div>#}
{#                    <div class="row">#}
{#                        <div class="col-md-10 col-md-offset-1">#}
{#                            版面帖子数：{{ board.board_total_post }}#}
{#                        </div>#}
{#                    </div>#}
{##}
{#                </div>#}
{#                <hr>#}
{#            </div>#}

        <div class="row">
            <div class="col-md-1 col-md-offset-1">
                {% if board.board_logo %}
                    <img src="/media/{{ board.board_logo }}" class="img-responsive">
                {% else %}
                    <img src="{% static 'img/bbs/442.gif' %}" class="img-responsive">
                {% endif %}
            </div>
            <div class="col-md-2">
                <div class="row">
                    <div class="col-md-8 col-md-offset-1">
                        <a href="{% url 'topic_list' board.id %}">{{ board.board_title }}</a>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-8 col-md-offset-1">
                        {{ board.board_desc_short }}
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-8 col-md-offset-1">
                        版面主题数：{{ board.board_total_topic }}
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-8 col-md-offset-1">
                       版面帖子数： {{ board.board_total_post }}
                    </div>
                </div>
            </div>
            <div class="col-md-4 col-md-offset-4">
                <img src="{% static 'img/bbs/none.jpg' %}"class="img-responsive">
            </div>
        </div>
        <hr>
        {% endfor %}
    </div>
{% endblock %}
{% block foot_js %}
    <script src="{% static 'js/bbs/index.js' %}"></script>
{% endblock %}